import http  from "@/http/index"


export default{


    add:{
        name:"添加品类",
        url:"/api/category/add",
        call: async function (params:any ={}) {
            return await http.post(this.url,params)
            
        }
    },
    getCategoryTree: {
        name: "品类列表，用于商品添加",
        url: "/api/category/getTree",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    select:{
        name:"品类一级分类列表列表",
        url:"/api/category/list",
        call: async function (params:any ={}) {
            return await http.get(this.url,params)
        }
    },
    selectById: {
        name: "根据id查询品类信息",
        url: "/api/category/get",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    selectPage: {
        name: "品类列表",
        url: "/api/category/pageList",
        call: async function (params: any = {}) {
            return await http.get(this.url, params)
        }
    },
    delete: {
        name: "品类列表",
        url: "/api/category/del",
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    },
    update: {
        name: "更新品类",
        url: "/api/category/update",
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
}
